package com.asset.dispoal.business.appoint.service;

import com.asset.dispoal.business.appoint.api.AppointService;
import com.asset.dispoal.business.appoint.dto.AppointDetailResponse;
import com.asset.dispoal.business.appoint.dto.AppointDownloadOrderRequest;
import com.asset.dispoal.business.appoint.dto.AppointInsertRequest;
import com.asset.dispoal.business.appoint.dto.AppointPageRequest;
import com.asset.dispoal.business.appoint.dto.AppointPageResponse;
import com.asset.dispoal.business.appoint.dto.CanAppointCaseRequest;
import com.asset.dispoal.business.appoint.dto.CanAppointCaseResponse;
import com.asset.dispoal.business.appoint.dto.QueryAppointCaseRequest;
import com.asset.dispoal.business.appoint.dto.QueryDropAppointRequest;
import com.asset.dispoal.business.appoint.dto.QueryWithdrawlPageRequest;
import com.asset.dispoal.business.appoint.dto.QueryWithdrawlPageResponse;
import com.asset.dispoal.business.appoint.service.command.AppointDownloadOrderCommand;
import com.asset.dispoal.business.appoint.service.command.GetByIdAppointCommand;
import com.asset.dispoal.business.appoint.service.command.InsertAppointCommand;
import com.asset.dispoal.business.appoint.service.command.QueryAppointCommand;
import com.asset.dispoal.business.appoint.service.command.QueryAppointDetailCommand;
import com.asset.dispoal.business.appoint.service.command.QueryDropAppointCommand;
import com.asset.dispoal.business.appoint.service.command.QueryPageAppointCommand;
import com.asset.dispoal.business.appoint.service.command.QueryPageAppointDrawalCommand;
import com.asset.dispoal.business.appoint.service.command.QueryPageCanAppointCaseCommand;
import com.asset.dispoal.business.bsCase.dto.BsCaseResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.mhuang.pacebox.springboot.protocol.Result;
import tech.mhuang.pacebox.springboot.protocol.data.PageVO;

import java.util.List;

/**
 * @author qr
 * @date 2022/5/17$
 */
@Service
public class AppointServiceImpl implements AppointService {

    @Autowired
    QueryPageCanAppointCaseCommand queryPageCanAppointCaseCommand;

    @Autowired
    InsertAppointCommand insertAppointCommand;

    @Autowired
    QueryPageAppointCommand queryPageAppointCommand;

    @Autowired
    QueryAppointDetailCommand queryAppointDetailCommand;

    @Autowired
    QueryDropAppointCommand queryDropAppointCommand;
    @Autowired
    QueryAppointCommand queryAppointCommand;

    @Autowired
    AppointDownloadOrderCommand appointDownloadOrderCommand;

    @Autowired
    QueryPageAppointDrawalCommand queryPageAppointDrawalCommand;

    @Autowired
    GetByIdAppointCommand getByIdAppointCommand;

    @Override
    public Result<PageVO<CanAppointCaseResponse>> queryPageCanAppointCase(CanAppointCaseRequest request) {
        return queryPageCanAppointCaseCommand.execute(request);
    }

    @Override
    public Result insertAppoint(AppointInsertRequest request) {
        return insertAppointCommand.execute(request);
    }

    @Override
    public Result<PageVO<AppointPageResponse>> queryPage(AppointPageRequest request) {
        return queryPageAppointCommand.execute(request);
    }

    @Override
    public Result<List<BsCaseResponse>> queryDetailByAppointId(QueryAppointCaseRequest request) {
        return queryAppointDetailCommand.execute(request);
    }

    @Override
    public Result<List<AppointPageResponse>> queryDropAppoint(QueryDropAppointRequest request) {
        return queryDropAppointCommand.execute(request);
    }

    @Override
    public Result<List<AppointPageResponse>> queryAppoint(QueryDropAppointRequest request) {
        return queryAppointCommand.execute(request);
    }

    @Override
    public Result downloadOrder(AppointDownloadOrderRequest request) {
        return appointDownloadOrderCommand.execute(request);
    }

    @Override
    public Result<PageVO<QueryWithdrawlPageResponse>> queryPageWithdrawal(QueryWithdrawlPageRequest request) {
        return queryPageAppointDrawalCommand.execute(request);
    }

    @Override
    public Result<AppointDetailResponse> getById(String id) {
        return getByIdAppointCommand.execute(id);
    }
}
